//
//  EventParser.h
//  FootPrint
//
//  Created by alex tao on 3/21/13.
//  Copyright (c) 2013 alex tao. All rights reserved.
//

#import "CommonParser.h"
#import "EventQueryByIdResponse.pb.h"
#import "EventBoardQueryResponse.pb.h"
#import "EventBoardResponse.pb.h"
#import "EventModifyResponse.pb.h"
#import "EventMemberModifyResponse.pb.h"
#import "EventCreateResponse.pb.h"
#import "EventCancelResponse.pb.h"

@protocol EventParserDelegate <NSObject>

// 事件详情回调
- (void) didRecieveEventInfo:(EventQueryByIdResponseMessage*)event;
- (void) didRecieveEventMsg:(EventBoardQueryResponseMessage*)event;
- (void) didAddEventMsg:(EventBoardResponseMessage*)event;
- (void) didModifyEvent:(EventModifyResponseMessage*)event;
- (void) didModifyEventMember:(EventMemberModifyResponseMessage*)event;
- (void) didCreateEvent:(EventCreateResponseMessage*)event;
- (void) didCancleEvent:(EventCancelResponseMessage*)event;

@end

///////////////////////////////////////////////////////////////////////////////////////////////////

@interface EventParser : CommonParser

@property (nonatomic, assign) id<EventParserDelegate>        delegate;


// 事件详情信息，根据eventId查询
- (void) updateEventWithId:(long long)eventId;
- (void) updateMsgWithId:(long long)eventId;
- (void) addEventBoardMsg:(NSString*)msg forEventId:(long long)eventId andUserId:(long long)uid;

- (void) modifyEvent:(EventMessage*)msg forUser:(long long)uid;
- (void) modifyEvent:(long long)eventId andUserId:(long long)uid addMember:(NSArray*)add removeMember:(NSArray*)sub;

- (void) createEvent:(EventMessage*)msg forUser:(long long)uid;
- (void) cancelEvent:(long long)eventId forUser:(long long)uid;

@end
